package com.prs.crm.domain.cdxh;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import javax.persistence.ManyToOne;

import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;


/**
 * 库存
 * 
 * 
 * @author wangting
 */
@Entity
@Table(name = "cdxh_cdstock")
public class Cdstock extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	/**
	 * 配置单编号
	 */
	private String stockcode;

	/**
	 * 库存报警下限数
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private Integer min_amount;
	
	/**
	 * 库存报警上限数
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private Integer max_amount;
	/**
	 * 配置要求
	 */
	private String describes;

	/**
	 * 数量
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private Integer amount;
	
	/**
	 * 配置人
	 */
	private String designers;

	/**
	 * 时间
	 */
	private String dtime;

	private String productname;

	private String productColor;

	private String productnorm;

	private String productcode;

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Attachment attach;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getStockcode() {
		return stockcode;
	}

	public void setStockcode(String stockcode) {
		this.stockcode = stockcode;
	}

	public String getDescribes() {
		return describes;
	}

	public void setDescribes(String describes) {
		this.describes = describes;
	}



	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getProductname() {
		return productname;
	}

	public void setProductname(String productname) {
		this.productname = productname;
	}

	public String getProductColor() {
		return productColor;
	}

	public void setProductColor(String productColor) {
		this.productColor = productColor;
	}

	public String getProductnorm() {
		return productnorm;
	}

	public void setProductnorm(String productnorm) {
		this.productnorm = productnorm;
	}

	public String getProductcode() {
		return productcode;
	}

	public void setProductcode(String productcode) {
		this.productcode = productcode;
	}

	public Attachment getAttach() {
		return attach;
	}

	public void setAttach(Attachment attach) {
		this.attach = attach;
	}

	public String getDtime() {
		return dtime;
	}

	public void setDtime(String dtime) {
		this.dtime = dtime;
	}

	public String getDesigners() {
		return designers;
	}

	public void setDesigners(String designers) {
		this.designers = designers;
	}

	public Integer getMin_amount() {
		return min_amount;
	}

	public void setMin_amount(Integer min_amount) {
		this.min_amount = min_amount;
	}

	public Integer getMax_amount() {
		return max_amount;
	}

	public void setMax_amount(Integer max_amount) {
		this.max_amount = max_amount;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}


}
